
import re
from Behinder import *

bs64_str=re.compile(rb"[A-Za-z0-9+/]+={0,2}")
#bs64_str=re.compile(rb"(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})")
tmp=[]
with open("webshell3.pcapng","rb") as f:
    for i in f.readlines():
        try:
            #print("data:",i.strip())
            data_lt=re.findall(bs64_str,i.strip())
            for j in data_lt:
                print(j)
                tmp.append(j)
        except:
            continue


tmp1=[]
for i in tmp:
    try:
        de=JAVA(key='09020dd54a897ba0')
        de1=de.decrypt_req_payload(i)
        print(de1)
        tmp1.append(de1)
    except:
        continue


import base64
for i in tmp1:
    try:
        flag=re.findall(bs64_str,i)
        for j in flag:
            try:
                aa=base64.b64decode(j)
                print(aa)
            except:
                continue
    except:
        continue
